<template>
  <div class="">
    <div class="wrap banner">
    	<img src="static/img/banner_01.png" alt="">
      <div class="logo">
        <img src="static/img/img-logo.png" alt="">
      </div>
    </div>
    <book></book>
    <findreason></findreason>
    <customized></customized>
    <newVsOld></newVsOld>
    <goodTec></goodTec>
  </div>
</template>

<script>
import book from '@/components/book.vue'
import findreason from '@/components/findreason.vue'
import customized from '@/components/customized.vue'
import newVsOld from '../components/newVsOld'
import goodTec from '../components/goodTec'
export default {
  data () {
    return {
      
    }
  },
  created(){
    var custom = window.location.search.substr(1)
    this.setCookie('custom',custom);
  },
  methods: {
    //设置cookie
    setCookie: function(cname, cvalue, exdays) {
      var d = new Date();
      d.setTime(d.getTime() + (exdays * 60 * 1000));
      var expires = "expires=" + d.toGMTString();
      console.info(cname + "=" + cvalue + "; " + expires);
      document.cookie = cname + "=" + cvalue + "; " + expires;
      console.info(document.cookie);
    },
    //获取cookie
    getCookie: function(cname) {
      var name = cname + "=";
      var ca = document.cookie.split(';');
      for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1);
        if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
      }
      return "";
    }
  },
  components: {
    book,
    findreason,
    customized,
    newVsOld,
    goodTec
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.banner {
	width: 100%;
	height: 5.68rem;
}
.banner .logo {
  position: absolute;
  top: 0;
  left: 30px;
  width: 1.62rem;
  height: .45rem;
  font-size: 0;
}
</style>